function page_init() {
	//document.getElementById("saisie_data").setAttribute("class","hidden");
	//document.getElementById("validation").setAttribute("class","hidden");
}

function select_changed () {
	//alert("Select changed!");
	var v = document.getElementById("type_listage");
	var t = document.getElementById("saisie_data");
	if (v.value == "JRN"){
		document.getElementById("saisie_data").setAttribute("class","hidden");
	}
	else if (v.value =="ADH"){
		document.getElementById("saisie_data").setAttribute("class","");
	}
}

function getliste() {
	// Data field name should be more generic? Witha label switch on select?
	var v = document.getElementById("type_listage");
	if (v.value == "JRN"){
		var url= "RoutageExport.aspx";
		window.location=url;
	}
	else if (v.value =="ADH"){
		var asso = document.getElementById("asso");
		var ad = asso.value;
		if (ad.length != 0) {
			var url= "data2csv.aspx?nom=AD" + ad + ".csv&sql=exec listage_de_reference '" +ad + "'";
			//alert(url);
			window.location=url;
		}
		else {
			//document.getElementById("asso").setAttribute("class","error");
			alert("Hum.... il faut entrer un numero d'AD.","TEST");
		}
	}
}
